package com.bms.client.utils;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author zcx
 * @version 1.0
 * @description Publisher.java
 * @date 2021/3/28 0:06
 */
@Component
public class MyPublisher {

    @Resource
    private AmqpTemplate rabbitTemplate;

    public void sendMessage(String s) {
        System.out.println("发送消息 : " + s);
        rabbitTemplate.convertAndSend("felix-queue",s);
    }
}
